home *** CD-ROM | disk | FTP | other *** search
/ The Hadean Lands / The Hadean Lands CD-ROM (Zarf).iso / more-zarf-games / lists.z5 (.txt) < prev    next >
Z-code for Z-machine  |  1996-12-05  |  116KB  |  1,028 lines

  1. Resident data ends at 4be0, program starts at 4be0, file ends at 1c5b4
  2.  
  3. Starting analysis pass at address 4be0
  4.  
  5. End of analysis pass, low address = 4be0, high address = 19b56
  6.  
  7.  
  8. [Start of text]
  9.  
  10. S001: "Lists And Lists"
  11. S002: "
  12. An Interactive Tutorial
  13. Copyright 1996 by Andrew Plotkin.
  14. (First-time players should type "about".)
  15. "
  16. S003: "951024"
  17. S004: "5/12"
  18. S005: "a"
  19. S006: "You can't go that way."
  20. S007: "the"
  21. S008: "the"
  22. S009: "the"
  23. S010: "the"
  24. S011: "the"
  25. S012: "the"
  26. S013: "the"
  27. S014: "the"
  28. S015: "the"
  29. S016: "the"
  30. S017: "the"
  31. S018: "the"
  32. S019: "Darkness"
  33. S020: "It is pitch dark, and you can't see a thing."
  34. S021: "As good-looking as ever."
  35. S022: "Nameless item"
  36. S023: "your former self"
  37. S024: "Everything here is just like it always is, except for that door."
  38. S025: "are"
  39. S026: "You've been that way before."
  40. S027: "that"
  41. S028: "is"
  42. S029: "The door isn't nearly so interesting from the inside."
  43. S030: "You expected puzzle-less IF?"
  44. S031: "The couch has that peculiar slump of cushion that says that this couch
  45. has seen much service, mostly to a single vast rear end. Indeed, the depression
  46. is perfectly molded to the tuchus that occupies it at this very moment."
  47. S032: "The computer is a bulky grey thing. It gives the distinct impression
  48. that it's full of vacuum tubes. The monitor is blank at the moment. However,
  49. the keyboard is surmounted by two painfully obvious buttons; the green one is
  50. labelled "run", and the yellow one is labelled "reset"."
  51. S033: "is"
  52. S034: "your"
  53. S035: "It's a small cube of frosted glass. Neatly etched on one side are the
  54. words "Break glass to wake owner." Something turns slowly inside the box... you
  55. can't quite see what."
  56. S036: ""How To Program In Lisp!""
  57. S037: "    *** You have won ***"
  58. S038: "What I Learned In 15-212"
  59. S039: "(Now, is your tongue numb?)"
  60. S040: "Table of Contents:
  61.  
  62.     0:  Introduction
  63.     1:  What's Going On Here
  64.     2:  What's An Atom?
  65.     3:  What's a List?
  66.     4:  Functions
  67.     5:  Quoting Expressions
  68.     6:  Defining Atoms
  69.     7:  List Chopping
  70.     8:  List Constructing
  71.     9:  Tests and Logic
  72.     10: Comparisons
  73.     11: Conditionals
  74.     12: Creating Functions
  75.     13: Fun With Recursion
  76.     14: Local Definitions With Let
  77.     15: Recursion, Functions, Endless Fun
  78.     16: Scope
  79.     17: Return
  80.     18: Reference: Functions
  81.     19: Reference: Syntactic Forms
  82.     20: Reference: Improper Lists
  83. "
  84. S041: "A Simple Programmer's Introduction to Scheme"
  85. S042: "Introduction"
  86. S043: "What's Going On Here"
  87. S044: "What's An Atom?"
  88. S045: "What's a List?"
  89. S046: "Functions"
  90. S047: "Quoting Expressions"
  91. S048: "Defining Atoms"
  92. S049: "List Chopping"
  93. S050: "List Constructing"
  94. S051: "Tests and Logic"
  95. S052: "Comparisons"
  96. S053: "Conditionals"
  97. S054: "Creating Functions"
  98. S055: "Fun With Recursion"
  99. S056: "Local Definitions With Let"
  100. S057: "Recursion, Functions"
  101. S058: "Scope"
  102. S059: "Return"
  103. S060: "Reference: Functions"
  104. S061: "Reference: Syntactic Forms"
  105. S062: "Reference: Improper Lists"
  106. S063: "ITEM"
  107. S064: "0. Introduction"
  108. S065: "A Simple Programmer's Introduction to Scheme"
  109. S066: "1. What's Going On Here"
  110. S067: "5"
  111. S068: "5"
  112. S069: "5"
  113. S070: "5"
  114. S071: "don't"
  115. S072: "2. What's An Atom?"
  116. S073: "5"
  117. S074: "hello"
  118. S075: "-5"
  119. S076: "goodbye"
  120. S077: "darlene+mitchell"
  121. S078: "q-5"
  122. S079: "qq=5++qqq+"
  123. S080: "***"
  124. S081: "can't"
  125. S082: "("
  126. S083: ")"
  127. S084: ";"
  128. S085: ":"
  129. S086: "'"
  130. S087: "."
  131. S088: "5"
  132. S089: "5"
  133. S090: "-597"
  134. S091: "-597"
  135. S092: "0"
  136. S093: "0"
  137. S094: "hello"
  138. S095: "[Error: undefined atom: hello]"
  139. S096: "q-5"
  140. S097: "[Error: undefined atom: q-5]"
  141. S098: "***"
  142. S099: "[Error: undefined atom: ***]"
  143. S100: "3. What's a List?"
  144. S101: "(1)"
  145. S102: "(2 fred)"
  146. S103: "(2 fred)"
  147. S104: "(fred 2)"
  148. S105: "()"
  149. S106: "nil"
  150. S107: "()"
  151. S108: "nil"
  152. S109: "()"
  153. S110: "(one (two) three)"
  154. S111: "(((one) 2 fred) xxxx9)"
  155. S112: "(())"
  156. S113: "(hello mr ((operator)))"
  157. S114: "hello"
  158. S115: "mr"
  159. S116: "((operator))"
  160. S117: "(operator)"
  161. S118: "operator"
  162. S119: "1"
  163. S120: "2"
  164. S121: "3"
  165. S122: "1 2 3 four"
  166. S123: "1"
  167. S124: "2"
  168. S125: "3"
  169. S126: "[Error: undefined atom: four]"
  170. S127: "4. Functions"
  171. S128: "(+ 1 1)"
  172. S129: "2"
  173. S130: "(+ 1 1)"
  174. S131: "1"
  175. S132: "1"
  176. S133: "2"
  177. S134: "(+ 1 1)"
  178. S135: "+"
  179. S136: "is"
  180. S137: "+"
  181. S138: "[function]"
  182. S139: "[function]"
  183. S140: "(- 1 1)"
  184. S141: "0"
  185. S142: "-"
  186. S143: "[function]"
  187. S144: "-"
  188. S145: "all"
  189. S146: "(+ (+ 1 1) 4)"
  190. S147: "+"
  191. S148: "(+ 1 1)"
  192. S149: "2"
  193. S150: "4"
  194. S151: "4"
  195. S152: "2"
  196. S153: "4"
  197. S154: "(+ (+ 1 1) 4)"
  198. S155: "6"
  199. S156: "(+ 1 1 4)"
  200. S157: "6"
  201. S158: "(1 2 3 4)"
  202. S159: "[Error: object is not a function: 1]"
  203. S160: "(spoggly 2 3 4)"
  204. S161: "[Error: undefined atom: spoggly]"
  205. S162: "()"
  206. S163: "nil"
  207. S164: "()"
  208. S165: "nil"
  209. S166: "nil"
  210. S167: "nil"
  211. S168: "5. Quoting Expressions"
  212. S169: "hello"
  213. S170: "hello"
  214. S171: "hello"
  215. S172: "[Error: undefined atom: hello]"
  216. S173: "(quote hello)"
  217. S174: "hello"
  218. S175: "quote"
  219. S176: "(quote (+ 1 1))"
  220. S177: "(+ 1 1)"
  221. S178: "quote"
  222. S179: "'hello"
  223. S180: "hello"
  224. S181: "'(+ 1 1)"
  225. S182: "(+ 1 1)"
  226. S183: "'5"
  227. S184: "5"
  228. S185: "'+"
  229. S186: "+"
  230. S187: "+"
  231. S188: "'+"
  232. S189: "(quote +)"
  233. S190: "+"
  234. S191: "quote"
  235. S192: "quote"
  236. S193: "not"
  237. S194: "quote"
  238. S195: "[syntax]"
  239. S196: "6. Defining Atoms"
  240. S197: "+"
  241. S198: "(define x 5)"
  242. S199: "5"
  243. S200: "define"
  244. S201: "define"
  245. S202: "define"
  246. S203: "define"
  247. S204: "define"
  248. S205: "x"
  249. S206: "5"
  250. S207: "x"
  251. S208: "5"
  252. S209: "x"
  253. S210: "5"
  254. S211: "(+ x 1)"
  255. S212: "6"
  256. S213: "x"
  257. S214: "bob"
  258. S215: "(define x bob)"
  259. S216: "[Error: undefined atom: bob]"
  260. S217: "define"
  261. S218: "is"
  262. S219: "atom"
  263. S220: "bob"
  264. S221: "value"
  265. S222: "bob"
  266. S223: "(define x 'bob)"
  267. S224: "bob"
  268. S225: "x"
  269. S226: "bob"
  270. S227: "(+ x 1)"
  271. S228: "[Error: +: non-numeric argument: bob]"
  272. S229: "'x"
  273. S230: "x"
  274. S231: "x"
  275. S232: "5"
  276. S233: "'x"
  277. S234: "x"
  278. S235: "(define + 5)"
  279. S236: "(define addify +)"
  280. S237: "[function]"
  281. S238: "(addify 5 6)"
  282. S239: "11"
  283. S240: "7. List Chopping"
  284. S241: "car"
  285. S242: "cdr"
  286. S243: "(a bb ccc)"
  287. S244: "a"
  288. S245: "(a bb ccc)"
  289. S246: "(bb ccc)"
  290. S247: "term"
  291. S248: "list"
  292. S249: "((1 2) x y z)"
  293. S250: "(1 2)"
  294. S251: "(hello)"
  295. S252: "nil"
  296. S253: "car"
  297. S254: "cdr"
  298. S255: "car"
  299. S256: "cdr"
  300. S257: "+"
  301. S258: "-"
  302. S259: "(car '(a bb ccc))"
  303. S260: "a"
  304. S261: "(cdr '(a bb ccc))"
  305. S262: "(bb ccc)"
  306. S263: "(car (a bb cc))"
  307. S264: "car"
  308. S265: "cdr"
  309. S266: "(car 'a)"
  310. S267: "[Error: car: bad argument: a]"
  311. S268: "(car '())"
  312. S269: "[Error: car: bad argument: nil]"
  313. S270: "a"
  314. S271: "8. List Constructing"
  315. S272: "cons"
  316. S273: "(cons 'aaa '(bb c))"
  317. S274: "(aaa bb c)"
  318. S275: "(cons 'aaa nil)"
  319. S276: "(aaa)"
  320. S277: "(cons (car '(x y z z y)) (cdr '(x y z z y)))"
  321. S278: "(x y z z y)"
  322. S279: "(define magic-word '(x y z z y))"
  323. S280: "(x y z z y)"
  324. S281: "magic-word"
  325. S282: "(x y z z y)"
  326. S283: "(cons (car magic-word) (cdr magic-word))"
  327. S284: "(x y z z y)"
  328. S285: "cons"
  329. S286: "(cons 'a 'b)"
  330. S287: "(a . b)"
  331. S288: "list"
  332. S289: "(list 'a 'zzz)"
  333. S290: "(a zzz)"
  334. S291: "(list 'a '(1 2 3) 'end)"
  335. S292: "(a (1 2 3) end)"
  336. S293: "(list)"
  337. S294: "nil"
  338. S295: "(list '() (+ 4 5) '(+ 1 2) (cdr magic-word))"
  339. S296: "(nil 9 (+ 1 2) (y z z y))"
  340. S297: "magic-word"
  341. S298: "9. Tests and Logic"
  342. S299: "="
  343. S300: "(= 2 2)"
  344. S301: "t"
  345. S302: "(= 2 5)"
  346. S303: "nil"
  347. S304: "nil"
  348. S305: "t"
  349. S306: "t"
  350. S307: "nil"
  351. S308: "t"
  352. S309: "nil"
  353. S310: "<"
  354. S311: ">"
  355. S312: "<="
  356. S313: ">="
  357. S314: "null?"
  358. S315: "t"
  359. S316: "nil"
  360. S317: "nil"
  361. S318: "list?"
  362. S319: "t"
  363. S320: "nil"
  364. S321: "nil"
  365. S322: "(null? nil)"
  366. S323: "t"
  367. S324: "(null? t)"
  368. S325: "nil"
  369. S326: "(null? 0)"
  370. S327: "nil"
  371. S328: "(list? nil)"
  372. S329: "t"
  373. S330: "(list? 1)"
  374. S331: "nil"
  375. S332: "(list? 'a)"
  376. S333: "nil"
  377. S334: "(list? '(a))"
  378. S335: "t"
  379. S336: "10. Comparisons"
  380. S337: "="
  381. S338: "eqv?"
  382. S339: "equal?"
  383. S340: "eqv?"
  384. S341: "equal?"
  385. S342: "eq?"
  386. S343: "nil"
  387. S344: "(eqv? 1 2)"
  388. S345: "nil"
  389. S346: "(eqv? 2 2)"
  390. S347: "t"
  391. S348: "(eqv? 'one 'two)"
  392. S349: "nil"
  393. S350: "(eqv? 'two 'two)"
  394. S351: "t"
  395. S352: "(eqv? 2 'two)"
  396. S353: "nil"
  397. S354: "(eqv? nil 'two)"
  398. S355: "nil"
  399. S356: "(eqv? nil nil)"
  400. S357: "t"
  401. S358: "equal?"
  402. S359: "eqv?"
  403. S360: "t"
  404. S361: "(define greeting '(hi there))"
  405. S362: "(hi there)"
  406. S363: "(define aloha (list 'hi 'there))"
  407. S364: "(hi there)"
  408. S365: "(eqv? greeting greeting)"
  409. S366: "t"
  410. S367: "(eqv? greeting '(hi there))"
  411. S368: "nil"
  412. S369: "(eqv? greeting aloha)"
  413. S370: "nil"
  414. S371: "(eqv? '(hi there) '(hi there))"
  415. S372: "nil"
  416. S373: "(define hug greeting)"
  417. S374: "(hi there)"
  418. S375: "(eqv? greeting hug)"
  419. S376: "t"
  420. S377: "(eqv? aloha hug)"
  421. S378: "nil"
  422. S379: "'(hi there)"
  423. S380: "(list 'hi 'there)"
  424. S381: "eqv?"
  425. S382: "(define hug greeting)"
  426. S383: "greeting"
  427. S384: "hug"
  428. S385: "are"
  429. S386: "eqv?"
  430. S387: "equal?"
  431. S388: "equal?"
  432. S389: "equal?"
  433. S390: "(equal? greeting greeting)"
  434. S391: "t"
  435. S392: "(equal? greeting '(hi there))"
  436. S393: "t"
  437. S394: "(equal? '(hi there) '(hi there))"
  438. S395: "t"
  439. S396: "(equal? greeting aloha)"
  440. S397: "t"
  441. S398: "(equal? greeting hug)"
  442. S399: "t"
  443. S400: "(equal? aloha hug)"
  444. S401: "t"
  445. S402: "eqv?"
  446. S403: "equal?"
  447. S404: "eqv?"
  448. S405: "eqv?"
  449. S406: "equal?"
  450. S407: "eqv?"
  451. S408: "equal?"
  452. S409: "tell"
  453. S410: "person"
  454. S411: "11. Conditionals"
  455. S412: "cond"
  456. S413: "cond"
  457. S414: " (cond"
  458. S415: "    (test1 result1)"
  459. S416: "    (test2 result2)"
  460. S417: "    ..."
  461. S418: " )"
  462. S419: "cond"
  463. S420: "nil"
  464. S421: "nil"
  465. S422: "nil"
  466. S423: "nil"
  467. S424: "  if (test1) return result1;"
  468. S425: "  else if (test2) return result2;"
  469. S426: "  ..."
  470. S427: "  else return nil;"
  471. S428: "(t defaultresult)"
  472. S429: "t"
  473. S430: "(define val -25)"
  474. S431: "-25"
  475. S432: "(cond"
  476. S433: "  ((> val 0) 'positive)"
  477. S434: "  ((< val 0) 'negative)"
  478. S435: "  (t 'zero)"
  479. S436: ")"
  480. S437: "negative"
  481. S438: "val"
  482. S439: "positive"
  483. S440: "negative"
  484. S441: "zero"
  485. S442: "12. Creating Functions"
  486. S443: "lambda"
  487. S444: "(lambda (n) (+ n 1))"
  488. S445: "[function]"
  489. S446: "(define fred (lambda (n) (+ n 1)))"
  490. S447: "[function]"
  491. S448: "(fred 56)"
  492. S449: "57"
  493. S450: "fred"
  494. S451: "56"
  495. S452: "(lambda (n) (+ n 1))"
  496. S453: "+"
  497. S454: "car"
  498. S455: "((lambda (n) (+ n 1)) 56)"
  499. S456: "57"
  500. S457: "lambda"
  501. S458: "kind"
  502. S459: "(define n 56)"
  503. S460: "56"
  504. S461: "(+ n 1)"
  505. S462: "57"
  506. S463: "56"
  507. S464: "n"
  508. S465: "to the function"
  509. S466: "n"
  510. S467: "(define n 11)"
  511. S468: "11"
  512. S469: "(fred 93)"
  513. S470: "94"
  514. S471: "n"
  515. S472: "11"
  516. S473: "(define greeter (lambda () 'hello))"
  517. S474: "[function]"
  518. S475: "(greeter)"
  519. S476: "hello"
  520. S477: "(greeter 5)"
  521. S478: "[Error: too many arguments to function]"
  522. S479: "+"
  523. S480: "lambda"
  524. S481: "(define prefix-foo (lambda args (cons 'foo args)))"
  525. S482: "[function]"
  526. S483: "(prefix-foo 5)"
  527. S484: "(foo 5)"
  528. S485: "(prefix-foo 'a 'bb 'ccc)"
  529. S486: "(foo a bb ccc)"
  530. S487: "(prefix-foo)"
  531. S488: "(foo)"
  532. S489: "13. Fun With Recursion"
  533. S490: "loves"
  534. S491: "last"
  535. S492: "(define last (lambda (ls)"
  536. S493: "   (cond"
  537. S494: "     ((null? (cdr ls)) (car ls))"
  538. S495: "     (t (last (cdr ls)))"
  539. S496: ")))"
  540. S497: "last"
  541. S498: "ls"
  542. S499: "cond"
  543. S500: "(cdr ls)"
  544. S501: "null"
  545. S502: "(car ls)"
  546. S503: "(last (cdr ls))"
  547. S504: "(cdr ls)"
  548. S505: "nil"
  549. S506: "(null? (cdr ls))"
  550. S507: "(car ls)"
  551. S508: "last"
  552. S509: "ls"
  553. S510: "ls"
  554. S511: "(last '(a))"
  555. S512: "a"
  556. S513: "(last '(a bb))"
  557. S514: "bb"
  558. S515: "(last '(a bb c))"
  559. S516: "c"
  560. S517: "(last '(a bb c (xx)))"
  561. S518: "(xx)"
  562. S519: "14. Local Definitions With Let"
  563. S520: "let"
  564. S521: " (let"
  565. S522: "    ("
  566. S523: "      (atom1 value1)"
  567. S524: "      (atom2 value2)"
  568. S525: "      ..."
  569. S526: "    )"
  570. S527: "    result"
  571. S528: " )"
  572. S529: "let"
  573. S530: " ((lambda (atom1 atom2 ...) result)  (value1 value2 ...))"
  574. S531: "let"
  575. S532: "(let"
  576. S533: "    ((a 1) (b 2))"
  577. S534: "  (+ a b)"
  578. S535: ")"
  579. S536: "3"
  580. S537: "(let"
  581. S538: "    ((func car))"
  582. S539: "  (func '(a b c))"
  583. S540: ")"
  584. S541: "a"
  585. S542: "(let"
  586. S543: "    ((cost '(nickel dime)))"
  587. S544: "  (eqv? cost cost)"
  588. S545: ")"
  589. S546: "t"
  590. S547: "a"
  591. S548: "[Error: undefined atom: a]"
  592. S549: "func"
  593. S550: "[Error: undefined atom: func]"
  594. S551: "cost"
  595. S552: "[Error: undefined atom: cost]"
  596. S553: "all"
  597. S554: "let"
  598. S555: "any"
  599. S556: "let"
  600. S557: "let*"
  601. S558: "let*"
  602. S559: "let"
  603. S560: "(let*"
  604. S561: "  ((a 1)  (b (+ a 1)))"
  605. S562: "  b"
  606. S563: ")"
  607. S564: "2"
  608. S565: "let"
  609. S566: "a"
  610. S567: "(+ a 1)"
  611. S568: "15. Recursion, Functions, Endless Fun"
  612. S569: "let*"
  613. S570: "really"
  614. S571: "letrec"
  615. S572: "letrec"
  616. S573: "let"
  617. S574: "let*"
  618. S575: "inside lambda-expressions."
  619. S576: "(letrec"
  620. S577: "  ((a a))"
  621. S578: "  a"
  622. S579: ")"
  623. S580: "use"
  624. S581: "a"
  625. S582: "nil"
  626. S583: "letrec"
  627. S584: "letrec"
  628. S585: "letrec"
  629. S586: "can"
  630. S587: "letrec"
  631. S588: "(letrec"
  632. S589: "  ((a (lambda () a)))"
  633. S590: "  a"
  634. S591: ")"
  635. S592: "(lambda () a)"
  636. S593: "a"
  637. S594: "letrec"
  638. S595: "a"
  639. S596: "this"
  640. S597: "(define thing"
  641. S598: "  (letrec"
  642. S599: "    ((a (lambda () a)))"
  643. S600: "    a"
  644. S601: "  )"
  645. S602: ")"
  646. S603: "[function]"
  647. S604: "thing"
  648. S605: "letrec"
  649. S606: "a"
  650. S607: "a"
  651. S608: "a"
  652. S609: "itself"
  653. S610: "thing"
  654. S611: "[function]"
  655. S612: "(thing)"
  656. S613: "[function]"
  657. S614: "((thing))"
  658. S615: "[function]"
  659. S616: "(eqv? thing (thing))"
  660. S617: "t"
  661. S618: "eqv?"
  662. S619: "thing"
  663. S620: "(thing)"
  664. S621: "thing"
  665. S622: "thing"
  666. S623: "thing"
  667. S624: "let"
  668. S625: "letrec"
  669. S626: "(define thing"
  670. S627: "  (let"
  671. S628: "    ((a (lambda () a)))"
  672. S629: "    a"
  673. S630: "  )"
  674. S631: ")"
  675. S632: "[function]"
  676. S633: "(thing)"
  677. S634: "[Error: undefined atom: a]"
  678. S635: "let"
  679. S636: "a"
  680. S637: "has"
  681. S638: "a"
  682. S639: "a"
  683. S640: "let"
  684. S641: "letrec"
  685. S642: "letrec"
  686. S643: "16. Scope"
  687. S644: "let"
  688. S645: "let"
  689. S646: "define"
  690. S647: "(define selfer"
  691. S648: "  (lambda () selfer)"
  692. S649: ")"
  693. S650: "[function]"
  694. S651: "selfer"
  695. S652: "(define another-selfer selfer)"
  696. S653: "[function]"
  697. S654: "(define selfer 'toast)"
  698. S655: "toast"
  699. S656: "(another-selfer)"
  700. S657: "toast"
  701. S658: "(eqv? another-selfer (another-selfer))"
  702. S659: "nil"
  703. S660: "thing"
  704. S661: "another-thing"
  705. S662: "thing"
  706. S663: "made"
  707. S664: "17. Return"
  708. S665: "The Scheme Programming Language,"
  709. S666: "18. Reference: Functions"
  710. S667: "(car v)"
  711. S668: "v"
  712. S669: "(cdr v)"
  713. S670: "v"
  714. S671: "(cons v w)"
  715. S672: "v"
  716. S673: "w"
  717. S674: "(length v)"
  718. S675: "v"
  719. S676: "(list v ...)"
  720. S677: "(not v)"
  721. S678: "t"
  722. S679: "v"
  723. S680: "nil"
  724. S681: "nil"
  725. S682: "(eqv? v w)"
  726. S683: "t"
  727. S684: "v"
  728. S685: "w"
  729. S686: "nil"
  730. S687: "nil"
  731. S688: "(equal? v w)"
  732. S689: "t"
  733. S690: "v"
  734. S691: "w"
  735. S692: "eqv?"
  736. S693: "equal?"
  737. S694: "(null? v)"
  738. S695: "t"
  739. S696: "v"
  740. S697: "nil"
  741. S698: "nil"
  742. S699: "not"
  743. S700: "(list? v)"
  744. S701: "t"
  745. S702: "v"
  746. S703: "nil"
  747. S704: "nil"
  748. S705: "v"
  749. S706: "(= v ...)"
  750. S707: "t"
  751. S708: "t"
  752. S709: "(> v ...)"
  753. S710: "t"
  754. S711: "nil"
  755. S712: "t"
  756. S713: "(>= v ...)"
  757. S714: "t"
  758. S715: "nil"
  759. S716: "t"
  760. S717: "(< v ...)"
  761. S718: "t"
  762. S719: "nil"
  763. S720: "t"
  764. S721: "(<= v ...)"
  765. S722: "t"
  766. S723: "nil"
  767. S724: "t"
  768. S725: "(+ v ...)"
  769. S726: "0"
  770. S727: "(- v ...)"
  771. S728: "0"
  772. S729: "(eval v)"
  773. S730: "v"
  774. S731: "eval"
  775. S732: "eval"
  776. S733: "19. Reference: Syntactic Forms"
  777. S734: "(quote v)"
  778. S735: "v"
  779. S736: "(error ...)"
  780. S737: "(cond clause1 ...)"
  781. S738: "nil"
  782. S739: "nil"
  783. S740: "nil"
  784. S741: "nil"
  785. S742: "(define atom v)"
  786. S743: "v"
  787. S744: "atom"
  788. S745: "atom"
  789. S746: "(lambda arglist v)"
  790. S747: "arglist"
  791. S748: "v"
  792. S749: "arglist"
  793. S750: "nil"
  794. S751: "(let ((atom1 def1) ...) v)"
  795. S752: "v"
  796. S753: "(let* ((atom1 def1) ...) v)"
  797. S754: "def1"
  798. S755: "atom1"
  799. S756: "def2"
  800. S757: "atom2"
  801. S758: "v"
  802. S759: "(letrec ((atom1 def1) ...) v)"
  803. S760: "v"
  804. S761: "20. Reference: Improper Lists"
  805. S762: "cons"
  806. S763: "cons"
  807. S764: "'(a . b)"
  808. S765: "(a . b)"
  809. S766: "cons"
  810. S767: "(cons 'z '(a . b))"
  811. S768: "(z a . b)"
  812. S769: "(cons 'rats '(z a . b))"
  813. S770: "(rats z a . b)"
  814. S771: "isn't"
  815. S772: "is"
  816. S773: "'(a . (b c))"
  817. S774: "(a b c)"
  818. S775: "list?"
  819. S776: "Now"
  820. S777: "unable to set up the environment"
  821. S778: "unmatched right parenthesis"
  822. S779: "dot was used outside of a list"
  823. S780: "lambda: bad argument template"
  824. S781: "define: first argument is not an atom"
  825. S782: "let: first argument is not a list of lists"
  826. S783: "let: binding is not a list"
  827. S784: "let: binding must start with an atom"
  828. S785: "let: binding must contain a definition"
  829. S786: "letrec: first argument is not a list of lists"
  830. S787: "letrec: binding is not a list"
  831. S788: "letrec: binding must start with an atom"
  832. S789: "letrec: binding must contain a definition"
  833. S790: "let: first argument is not a list of lists"
  834. S791: "let: binding is not a list"
  835. S792: "let: binding must start with an atom"
  836. S793: "let: binding must contain a definition"
  837. S794: "length: not a proper list"
  838. S795: "car: bad argument"
  839. S796: "cdr: bad argument"
  840. S797: "cond: argument is not a list"
  841. S798: "cond: clause is not a list"
  842. S799: "cond: clause does not end in an expression"
  843. S800: "numeric compare: must have at least one argument"
  844. S801: "numeric compare: non-numeric argument"
  845. S802: "numeric compare: non-numeric argument"
  846. S803: "+: non-numeric argument"
  847. S804: "+: non-numeric argument"
  848. S805: "a dot must be followed by an object"
  849. S806: "only one object may follow a dot"
  850. S807: "ignoring quote before close parenthesis"
  851. S808: "ignoring quote before dot"
  852. S809: "(internal) zero-length atom name"
  853. S810: "computation interrupted"
  854. S811: "undefined atom"
  855. S812: "object is not a function"
  856. S813: "attempt to evaluate free memory"
  857. S814: "cannot evaluate object"
  858. S815: "(internal) too many arguments in built-in function"
  859. S816: "too many arguments to function"
  860. S817: "too few arguments to function"
  861. S818: "too many arguments to function"
  862. S819: "too few arguments to function"
  863. S820: "heap memory is full"
  864. S821: "(internal) attempt to free a garbage pointer"
  865. S822: "(internal) attempt to free a free block"
  866. S823: "garbage-collect: encountered free memory block in environment"
  867. S824: "garbage-collect: encountered unused memory block in environment"
  868. S825: "atom name memory is full"
  869. S826: "twentyseven"
  870. S827: "cat"
  871. S828: "dog"
  872. S829: "cat"
  873. S830: "dog"
  874. S831: "equal?"
  875. S832: "eqv?"
  876. S833: "cdr(cat)"
  877. S834: "cdr(dog)"
  878. S835: "eqv?"
  879. S836: "abs"
  880. S837: "(abs 4)"
  881. S838: "4"
  882. S839: "(abs -5)"
  883. S840: "5"
  884. S841: "(abs 0)"
  885. S842: "0"
  886. S843: "sum"
  887. S844: "(sum '(8 2 3))"
  888. S845: "13"
  889. S846: "(sum nil)"
  890. S847: "0"
  891. S848: "megasum"
  892. S849: "(megasum '((8) 5 (2 () (9 1) 3)))"
  893. S850: "28"
  894. S851: "max"
  895. S852: "(max '(5 14 -3))"
  896. S853: "14"
  897. S854: "pocket"
  898. S855: "pocket"
  899. S856: "nil"
  900. S857: "8"
  901. S858: "pocket"
  902. S859: "pocket"
  903. S860: "(pocket nil)"
  904. S861: "8"
  905. S862: "(pocket 12)"
  906. S863: "[function]"
  907. S864: "(define newpocket (pocket 12))"
  908. S865: "[function]"
  909. S866: "(newpocket nil)"
  910. S867: "12"
  911. S868: "(define thirdpocket (newpocket 3))"
  912. S869: "[function]"
  913. S870: "(thirdpocket nil)"
  914. S871: "3"
  915. S872: "(newpocket nil)"
  916. S873: "12"
  917. S874: "(pocket nil)"
  918. S875: "8"
  919. S876: "define"
  920. S877: "(define twentyseven 27)"
  921. S878: "27"
  922. S879: "twentyseven"
  923. S880: "define"
  924. S881: "cat"
  925. S882: "dog"
  926. S883: "equal?"
  927. S884: "eqv?"
  928. S885: "eqv?"
  929. S886: "cons"
  930. S887: "eqv?"
  931. S888: "(define tail '(end))"
  932. S889: "(define cat (cons 'head tail))"
  933. S890: "(define dog (cons 'head tail))"
  934. S891: "positive negative zero"
  935. S892: "(define abs (lambda (val)"
  936. S893: "  (cond"
  937. S894: "    ((> val 0) val)"
  938. S895: "    ((< val 0) (- 0 val))"
  939. S896: "    (t 0)"
  940. S897: "  )))"
  941. S898: "last"
  942. S899: "sum"
  943. S900: "(define sum (lambda (s)"
  944. S901: "  (cond"
  945. S902: "    ((null? s) 0)"
  946. S903: "    (t (+"
  947. S904: "        (car s)"
  948. S905: "        (sum (cdr s)))"
  949. S906: "    ))))"
  950. S907: "megasum"
  951. S908: "sum"
  952. S909: "cond"
  953. S910: "list?"
  954. S911: "megasum"
  955. S912: "(define megasum (lambda (s)"
  956. S913: "  (cond"
  957. S914: "    ((null? s) 0)"
  958. S915: "    (t (+"
  959. S916: "        (cond"
  960. S917: "          ((list? (car s)) (megasum (car s)))"
  961. S918: "          (t (car s)))"
  962. S919: "        (megasum (cdr s))))"
  963. S920: "  )))"
  964. S921: "max"
  965. S922: "let"
  966. S923: "max"
  967. S924: "max"
  968. S925: "max"
  969. S926: "max"
  970. S927: "last"
  971. S928: "(define max (lambda (s)"
  972. S929: "  (cond"
  973. S930: "    ((null? (cdr s)) (car s))"
  974. S931: "    (t (let"
  975. S932: "        ("
  976. S933: "          (hd (car s))"
  977. S934: "          (tl (max (cdr s)))"
  978. S935: "        )"
  979. S936: "        (cond"
  980. S937: "          ((> hd tl) hd)"
  981. S938: "          (t tl)))))))"
  982. S939: "define"
  983. S940: "let"
  984. S941: "let"
  985. S942: "gen"
  986. S943: "(gen 5)"
  987. S944: "x"
  988. S945: "(lambda (y)"
  989. S946: "  (cond"
  990. S947: "    ((null? y) x)"
  991. S948: "    (t (generator y))))"
  992. S949: "y"
  993. S950: "y"
  994. S951: "nil"
  995. S952: "x"
  996. S953: "y"
  997. S954: "letrec"
  998. S955: "(define pocket"
  999. S956: "  (letrec"
  1000. S957: "    ("
  1001. S958: "      (generator (lambda (x)"
  1002. S959: "        (lambda (y)"
  1003. S960: "          (cond"
  1004. S961: "            ((null? y) x)"
  1005. S962: "            (t (generator y))))))"
  1006. S963: "    )"
  1007. S964: "    (generator 8)))"
  1008. S965: "twentyseven"
  1009. S966: "equal?"
  1010. S967: "eqv?"
  1011. S968: "cdr(cat)"
  1012. S969: "cdr(dog)"
  1013. S970: "eqv?"
  1014. S971: "(define tail '(end))"
  1015. S972: "(define cat (cons 'head tail))"
  1016. S973: "(define dog (cons 'head tail))"
  1017. S974: "eqv?"
  1018. S975: "cat"
  1019. S976: "dog"
  1020. S977: "nil"
  1021. S978: "nil"
  1022. S979: "eqv?"
  1023. S980: "nil"
  1024.  
  1025. [End of text]
  1026.  
  1027. [End of file]
  1028.